package com.robot.service;

import com.robot.smartqq.client.SmartQQClient;
import com.robot.smartqq.model.Message;
import com.robot.task.StartQQ;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/8/31 0031.
 */
@Service
public class QqServiceImpl implements QqService {

    @Override
    public List getFrind() {
        return StartQQ.friendList;
    }

    @Override
    public List getGroup() {
        return StartQQ.groupList;
    }

    @Override
    public boolean sendOneMsg(long friendId, String msg) {

        try {
            StartQQ.client.sendMessageToFriend( friendId,  msg);
            return true;
        }catch (Exception e){
            e.getMessage();
        }
        return false;
    }
}
